{extend name="main/index" /}
{block name="main"}
<div class="main-content">
    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
        </script>

        <ul class="breadcrumb">
            <i class="icon-home home-icon"></i>
            <li class="active">用户列表</li>
        </ul><!-- .breadcrumb -->

        <div class="nav-search" id="nav-search">
            <form class="form-search"  action="{:url('/User/index')}" method = "post">
                <span class="input-icon">
                    <input type="text" placeholder="Search ..." class="nav-search-input" name="search" id="nav-search-input" autocomplete="off" />
                    <!-- <i class="icon-search nav-search-icon"></i> -->
                    <input type="submit" value="搜索">
                </span>
            </form>
        </div><!-- #nav-search -->
    </div>

    <div class="page-content">
        <h3 class="header smaller lighter blue">用户列表</h3>
        <div class="row">
            <div class="col-xs-12">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="table-responsive">
                            <table id="sample-table-2" class="table table-striped table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <!-- <th class="center">
                                            <label>
                                                <input type="checkbox" class="ace" />
                                                <span class="lbl"></span>
                                            </label>
                                        </th> -->
                                        <th>ID</th>
                                        <th>用户名</th>
                                        <th class="hidden-480">姓名</th>

                                        <th>
                                            <i class="icon-time bigger-110 hidden-480"></i>
                                            所属角色
                                        </th>
                                        <th class="hidden-480">操作</th>

                                    </tr>
                                </thead>
                                <tbody>
                                {volist name="list" id="v"}
                                    <tr>
                                        <td>{$v['id']}</td>
                                        <td>{$v['username']}</td>
                                        <td>{$v['name']}</td>
                                        <td>
                                            {volist name="v['role']" id = "x"}
                                            <?php //var_dump($x); ?>
                                                <span style="color:#999">
                                                    <?php
                                                        //foreach($x as $k =>$c){
                                                            //echo $c;
                                                        //}
                                                    ?>
                                                    {volist name="x" id="c"}
                                                    {$c}
                                                    {/volist}
                                                </span>
                                            {/volist}
                                        </td>
                                        
                                        <td>
                                            <a href="{:url('admin/user/edit', ['id' => $v['id']])}" class="btn btn-primary btn-xs">修改</a> | 
                                            <a href="{:url('admin/user/showrole', ['id' => $v['id']])}" class="btn btn-primary btn-xs">分配角色</a> | 
                                            <!-- <a href="">删除</a> -->
                                            <button data-id="{$v['id']}" class="btn btn-xs btn-danger del-btn">拉黑</button>
                                        </td>
                                    </tr>
                                {/volist}
                                </tbody>
                            </table>

                        </div>

                        {$page->render()}
                    </div>
                </div>
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.page-content -->

        
        

</div>
{/block}


{block name="myjs"}
{js href="/static/admin/assets/js/toastr.min.js"}

{js href="/static/admin/assets/xiaojs/admin_user.js"}


{/block}




